#ifndef HAVE_TEXT2XML_VECTOR_ITER_H
#define HAVE_TEXT2XML_VECTOR_ITER_H

#include "Vector.h"

#ifdef __cplusplus
extern "C" {
#endif
  typedef struct _VectorIter VectorIter;

  struct _VectorIter {
    Vector* vector;
    long    pos;
  };

  /**
   * Returns a new vector iterator.
   */
  VectorIter* vector_iter_new(Vector* vector);

  /**
   * Destroys the iterator.
   */
  void vector_iter_free(VectorIter* iter);

  /**
   * Points the iterator to the previous item.
   */
  VectorIter* vector_iter_prev(VectorIter* iter);

  /**
   * Points the iterator to the next item.
   */
  VectorIter* vector_iter_next(VectorIter* iter);

  /**
   * Returns the data pointed to by the iterator.
   */
  void* vector_iter_get_data(VectorIter* iter);
#ifdef __cplusplus
}
#endif                          /* __cplusplus */
#endif                          /* HAVE_TEXT2XML_VECTOR_ITER_H */
